package com.niiwoo.civet.trade.service.local.newRefund.notify.dto;

import lombok.Getter;
import lombok.Setter;

/**
 * 还款通知处理结果 
 *
 * @author: kevin.jia
 * @version 1.0.0
 */
@Setter
@Getter
public class RefundNotifyHandleResult {
	
	public static final Integer SUCCESS_CODE = 0;
	
	public static final Integer FAIL_CODE = 1;
	
	/** 处理状态 0：成功；1：失败 */
	private Integer code;
	
	/** 处理失败原因 */
	private String message;
	
	/** 还款消息记录Id */
	private Long refundNotifyRecordId;
	
	public RefundNotifyHandleResult() {
		this.code = SUCCESS_CODE;
	}

	public RefundNotifyHandleResult(String message) {
		this.code = FAIL_CODE;
		this.message = message;
	}
	
	public RefundNotifyHandleResult(Integer code, String message) {
		this.code = code;
		this.message = message;
	}

	public Boolean isSuccess() {
		return SUCCESS_CODE.equals(code);
	}
}